package com.sc.nft.dao;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.TradingDestructionConfig;
import com.sc.nft.mapper.TradingDestructionConfigMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author PC
 * @description 针对表【sc_trading_destruction_config(交易池销毁配置)】的数据库操作Dao
 * @createDate 2024-10-26 13:49:26
 */
@Slf4j
@Repository
public class TradingDestructionConfigDao extends ServiceImpl<TradingDestructionConfigMapper, TradingDestructionConfig> {

    /**
     * 根据配置id获取销毁配置
     *
     * @param confId
     * @return
     */
    public List<TradingDestructionConfig> listByConfId(Long confId) {
        LambdaQueryWrapper<TradingDestructionConfig> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(TradingDestructionConfig::getTradingPoolConfigId, confId);
        return list(wrapper);
    }


}
